package com.zlcx.tz.live.client;

import com.zlcx.tz.live.client.vo.UserFollowInfo;
import com.zlcx.tz.live.client.vo.UserFriendVO;
import com.zlcx.tz.live.client.vo.UserFriendsCondition;
import com.zlcx.tz.live.client.vo.UserRelationVO;
import com.zlcx.tz.live.common.config.OauthFeignConfig;
import com.zlcx.tz.live.vo.ResultVO;
import com.zlcx.tz.live.vo.page.PageResultVO;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p></p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author zl
 * @version 1.0
 * @date Created in 2019/4/18 11:07
 * @copyright: Copyright (c) founders
 */
@FeignClient(name = "tz-user-friend", configuration = OauthFeignConfig.class)
public interface UserFriendClient {

    @Headers("sig: {sig}")
    @GetMapping(value = "/user/friendsAll")
    ResultVO<List<UserFriendVO>> userFriendsList(@RequestParam("userId") Long userId);

    @PostMapping("/user/follows")
    ResultVO<PageResultVO<UserFollowInfo>> follows(@RequestBody UserFriendsCondition condition);

    @Headers("sig: {sig}")
    @GetMapping(value = "/user/myBlacklist")
    ResultVO myBlacklist(@RequestHeader("sig") String sig, @RequestParam("userId") Long userId);

    @PostMapping("/user/relation/{hostUserId}")
    ResultVO<List<UserRelationVO>> relation(@PathVariable("hostUserId") Long hostUserId, @RequestBody List<Long> userIds);

}
